package com.server.http.handler.impl;

import com.server.conditionenum.HttpReturnStatus;
import com.server.db.DataBaseManager;
import com.server.http.handler.HttpHandler;
import com.server.http.request.HttpRequestMessage;
import com.server.http.response.HttpResponseMessage;
import com.server.mine.net.HttpProtocol;

/**
* @author	李小布
* @email	397554852@qq.com
* @version	创建时间：2018年9月20日 下午5:00:13
*/
public class GetAppList extends HttpHandler{

	@Override
	public void handle(HttpRequestMessage request, HttpResponseMessage response) {
		
		String json = DataBaseManager.GetInstance().GetAppList();
		
		if(json != null) {
			SetReturnData(response,json,HttpProtocol.GETAPPLIST,HttpReturnStatus.Successed);
		}else {
			SetReturnData(response,"获取应用列表失败!",HttpProtocol.GETAPPLIST,HttpReturnStatus.Successed);
		}
	}
}